﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Hasiu.Mvc.ViewModels.ProductImgViewModel>" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Index</title>
    <link href="/css/zhx.css" rel="stylesheet" type="text/css" />
    <script src="/js/zhx.js" type="text/javascript"></script>
</head>
<body>
    <table class="table_frame">
        <tr class="header">
            <td>
                苗木（<%= Hasiu.Service.ProductService._.Get(Request["productId"]).Name%>）图片列表
                <% 
                    if (string.IsNullOrEmpty(Request["returnUrl"]))
                    {
                %>
                <a href="/admin/product/save.aspx">继续添加新苗木</a>
                <%
                    }
                    else
                    { 
                %>
                <a href="<%= Request["returnUrl"] %>">返回苗木列表</a>
                <%
                    }
                %>
                
            </td>
        </tr>
    </table>
    <table class="table_grid">
        <tr class="header">
            <td>图片</td>
            <td>删除</td>
        </tr>
        <% 
            foreach (var v in Model.GetProductImgList)
            { 
        %>
        <tr>
            <td><a href="/admin/product/img.aspx?productId=<%= Request["productId"] %>&id=<%= v.Id %>&returnUrl=<%= Request["returnUrl"] %>"><img src="<%= v.UrlMiddle %>" class="imageZoom" height="25px" /></a></td>
            <td><a href="/admin/product/img/del.aspx?productId=<%= Request["productId"] %>&id=<%= v.Id %>&returnUrl=<%= Request["returnUrl"] %>" class="tssc" title="删除">X</a></td>
        </tr>
        <%
            }
        %>
    </table>
    <form class="yz" action="" method="post">
        <table class="table_frame">
            <tr class="header">
                <td colspan="100">
                    <%= Model.GetProductImg == null ? "添加图片" : "修改图片 <a href='/admin/product/img.aspx?productId=" + Request["productId"] + "'/>返回添加图片</a>" %>
                </td>
            </tr>
            <tr>
                <td>大图</td>
                <td>
                    <input type="text" name="UrlBig" value="<%= Model.GetProductImg == null ? "" : Model.GetProductImg.UrlBig %>" id="Img" cutImg="400,300" minImg="200,150,Img2|40,30,Img3" class="{required:true}"  />
                </td>
            </tr>
            <tr>
                <td>中图</td>
                <td>
                    <input type="text" name="UrlMiddle" value="<%= Model.GetProductImg == null ? "" : Model.GetProductImg.UrlMiddle %>" id="Img2" class="{required:true}"  />
                </td>
            </tr>
            <tr>
                <td>小图</td>
                <td>
                    <input type="text" name="UrlSmall" value="<%= Model.GetProductImg == null ? "" : Model.GetProductImg.UrlSmall %>" id="Img3" class="{required:true}"  />
                </td>
            </tr>
            <tr class="footer">
                <td colspan="100">
                    <input class="btnSave" type="submit" value="保存" />
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
